| Conditions | 8 | 
| Paths | 4 | 
| Total Lines | 40 | 
| Code Lines | 29 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | 'use strict'; | ||
| 3 | function reCaptchaInit() { | ||
| 4 |     var element = document.createElement('script'), | ||
| 5 |         target = document.querySelectorAll('script')[0], | ||
| 6 | protocol = 'https:' == document.location.protocol ? 'https' : 'http'; | ||
| 7 | element.type = 'text/javascript'; | ||
| 8 | element.src = protocol + '://www.google.com/recaptcha/api.js?onload=reCaptchaOnloadCallback&render=explicit&hl='.concat(window.SS_LOCALE); | ||
| 9 | target.parentNode.insertBefore(element, target); | ||
| 10 | } | ||
| 11 | |||
| 12 | function reCaptchaOnloadCallback() { | ||
| 13 |     var reCaptcha = document.querySelector('.g-recaptcha'); | ||
| 14 | |||
| 15 |     if (reCaptcha.dataset.size === 'invisible') { | ||
| 16 |         document.querySelector('#'.concat(window.ReCaptchaFormId)).addEventListener('submit', reCaptchaFormOnSubmit); | ||
| 17 | } | ||
| 18 | |||
| 19 | grecaptcha.render(reCaptcha, reCaptcha.dataset); | ||
|  | |||
| 20 | } | ||
| 21 | |||
| 22 | function reCaptchaOnSubmit(token) { | ||
| 23 |     document.querySelector('#'.concat(window.ReCaptchaFormId, ' .g-recaptcha-response')).value = token; | ||
| 24 |     document.querySelector('#'.concat(window.ReCaptchaFormId)).submit(); | ||
| 25 | } | ||
| 26 | |||
| 27 | function reCaptchaFormOnSubmit(event) { | ||
| 28 | event.preventDefault(); | ||
| 29 | grecaptcha.execute(); | ||
| 30 | } | ||
| 31 | |||
| 32 | domReady(reCaptchaInit); | ||
| 33 | 
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.